package com.pxene.hbasetime;

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.Reducer;

public class HBaseTimeCountReducer extends Reducer<LongWritable, LongWritable, LongWritable, LongWritable> {
	private LongWritable resultVal = new LongWritable(1);
	@Override
	protected void reduce(LongWritable key, Iterable<LongWritable> values, Reducer<LongWritable, LongWritable, LongWritable, LongWritable>.Context context) throws IOException, InterruptedException {
		long sum=0;
		for (LongWritable each : values) {
			sum+=each.get();	
		}
		resultVal.set(sum);
		context.write(key, resultVal);
	}
}
